/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package util;

/**
 *
 * @author Ricardo
 */
public enum Sexo {
    Masculino ('M'),
    Feminino ('F');

    public static Sexo getSexo(char codigo) {
        for (Sexo umSexo : Sexo.values())
            if (umSexo.codigo == Character.toUpperCase(codigo))
                return umSexo;
        return null;
    }

    private Sexo(char codigo) {
        this.codigo = codigo;
    }

    private char codigo;

}
